﻿namespace PMS.Client.FrmUserPositionLevel
{
    using PMS.BLL;
    using PMS.Client.FrmJobTitle;
    using PMS.Common;
    using PMS.Model;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class FrmPositionLevelUpdate : Form
    {
        private Button btnCancel;
        private Button btnJobTitle;
        private Button btnJobTitle2;
        private Button btnSave;
        private IContainer components = null;
        private GroupBox groupBox1;
        private GroupBox groupBox2;
        private CheckBox isDoublePosition;
        private Label label1;
        private Label label10;
        private Label label11;
        private Label label2;
        private Label label24;
        private Label label25;
        private Label label3;
        private Label label35;
        private Label label37;
        private Label label4;
        private Label label45;
        private Label label5;
        private Label label6;
        private Label label7;
        private Label label8;
        private Label label9;
        private Label lbTitle;
        private List<UserPositionLevel> LevelList = new UserPositionLevelBLL().GetList();
        private Panel panel1;
        private TextBox txtJobTitle1;
        private TextBox txtJobTitle2;
        private ComboBox txtPosition1;
        private ComboBox txtPosition2;
        private DateTimePicker txtPositionEndDate1;
        private DateTimePicker txtPositionEndDate2;
        private ComboBox txtPositionLevel1;
        private ComboBox txtPositionLevel2;
        private TextBox txtPositionNo1;
        private TextBox txtPositionNo2;
        private DateTimePicker txtPositionStartDate1;
        private DateTimePicker txtPositionStartDate2;
        private TextBox txtPostionRemark1;
        private TextBox txtPostionRemark2;
        private TextBox txtSex;
        private TextBox txtUserName;
        private User user = null;
        private int userid = 0;

        public FrmPositionLevelUpdate(int userid)
        {
            this.InitializeComponent();
            this.userid = userid;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            base.Close();
        }

        private void btnJobTitle_Click(object sender, EventArgs e)
        {
            FrmSelect select = new FrmSelect();
            select.ShowDialog();
            if (select.DialogResult == DialogResult.OK)
            {
                this.txtJobTitle1.Text = select.JobTitle;
            }
        }

        private void btnJobTitle2_Click(object sender, EventArgs e)
        {
            FrmSelect select = new FrmSelect();
            select.ShowDialog();
            if (select.DialogResult == DialogResult.OK)
            {
                this.txtJobTitle2.Text = select.JobTitle;
            }
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            UserChangeLog log2 = new UserChangeLog {
                Position1 = this.txtPosition1.Text,
                PositionLevel1 = this.txtPositionLevel1.Text,
                JobTitle1 = this.txtJobTitle1.Text,
                PositionStartDate1 = new DateTime?(this.txtPositionStartDate1.Value),
                PositionEndDate1 = new DateTime?(this.txtPositionEndDate1.Value),
                PositionNo1 = this.txtPositionNo1.Text,
                PositionRemark1 = this.txtPostionRemark1.Text,
                IsDoublePosition = new int?(this.isDoublePosition.Checked ? 1 : 0),
                UserID = this.userid,
                UpdateDate = new DateTime?(DateTime.Now),
                UpdateUser = PMS.Common.Keys.Admin.LoginName,
                LogType = "定岗",
                CheckState = "未审核"
            };
            UserChangeLog model = log2;
            if (this.isDoublePosition.Checked)
            {
                model.Position2 = this.txtPosition2.Text;
                model.PositionLevel2 = this.txtPositionLevel2.Text;
                model.JobTitle2 = this.txtJobTitle2.Text;
                model.PositionStartDate2 = new DateTime?(this.txtPositionStartDate2.Value);
                model.PositionEndDate2 = new DateTime?(this.txtPositionEndDate2.Value);
                model.PositionNo2 = this.txtPositionNo2.Text;
                model.PositionRemark2 = this.txtPostionRemark2.Text;
            }
            if (new UserChangeLogBLL().Add(model) > 0)
            {
                MessageBox.Show("定岗成功，等待审核中！");
                base.Close();
            }
            else
            {
                MessageBox.Show("定岗失败！");
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void FrmUpdatePositionLevel_Load(object sender, EventArgs e)
        {
            List<UserPosition> collection = new UserPositionBLL().GetList();
            UserPosition item = new UserPosition {
                PositionID = 0,
                PositionName = "请选择"
            };
            collection.Insert(0, item);
            this.user = new UserBLL().GetModel(this.userid);
            this.txtPosition1.DisplayMember = "PositionName";
            this.txtPosition1.ValueMember = "PositionID";
            this.txtPosition1.DataSource = collection;
            List<UserPosition> list2 = new List<UserPosition>(collection);
            this.txtPosition2.DisplayMember = "PositionName";
            this.txtPosition2.ValueMember = "PositionID";
            this.txtPosition2.DataSource = list2;
            UserPositionLevel level = new UserPositionLevel {
                LevelID = 0,
                PositionID = 0,
                LevelValue = "请选择"
            };
            this.LevelList.Insert(0, level);
            this.txtPositionLevel1.DisplayMember = "LevelValue";
            this.txtPositionLevel1.ValueMember = "LevelID";
            this.txtPositionLevel1.DataSource = this.LevelList;
            List<UserPositionLevel> levelList = this.LevelList;
            this.txtPositionLevel2.DisplayMember = "LevelValue";
            this.txtPositionLevel2.ValueMember = "LevelID";
            this.txtPositionLevel2.DataSource = levelList;
            this.txtUserName.Text = this.user.UserName;
            this.txtSex.Text = this.user.Sex;
            this.txtPosition1.Text = this.user.Position1;
            this.txtPositionLevel1.Text = this.user.PositionLevel1;
            this.txtJobTitle1.Text = this.user.JobTitle1;
            this.txtPositionStartDate1.Value = !this.user.PositionStartDate1.HasValue ? DateTime.Now : this.user.PositionStartDate1.Value;
            this.txtPositionEndDate1.Value = !this.user.PositionEndDate1.HasValue ? DateTime.Now : this.user.PositionEndDate1.Value;
            this.txtPositionNo1.Text = this.user.PositionNo1;
            this.txtPostionRemark1.Text = this.user.PositionRemark1;
            this.isDoublePosition.Checked = this.user.IsDoublePosition == 1;
            this.panel1.Enabled = false;
            if (this.user.IsDoublePosition == 1)
            {
                this.panel1.Enabled = true;
                this.txtPosition2.Text = this.user.Position2;
                this.txtPositionLevel2.Text = this.user.PositionLevel2;
                this.txtJobTitle2.Text = this.user.JobTitle2;
                this.txtPositionStartDate2.Value = !this.user.PositionStartDate2.HasValue ? DateTime.Now : this.user.PositionStartDate2.Value;
                this.txtPositionEndDate2.Value = !this.user.PositionEndDate2.HasValue ? DateTime.Now : this.user.PositionEndDate2.Value;
                this.txtPositionNo2.Text = this.user.PositionNo2;
                this.txtPostionRemark2.Text = this.user.PositionRemark2;
            }
        }

        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(FrmPositionLevelUpdate));
            this.txtPosition1 = new ComboBox();
            this.label37 = new Label();
            this.btnCancel = new Button();
            this.btnSave = new Button();
            this.groupBox1 = new GroupBox();
            this.txtSex = new TextBox();
            this.label1 = new Label();
            this.txtUserName = new TextBox();
            this.label8 = new Label();
            this.groupBox2 = new GroupBox();
            this.panel1 = new Panel();
            this.txtPositionEndDate2 = new DateTimePicker();
            this.txtPosition2 = new ComboBox();
            this.label4 = new Label();
            this.label11 = new Label();
            this.txtPositionLevel2 = new ComboBox();
            this.label10 = new Label();
            this.label5 = new Label();
            this.txtPostionRemark2 = new TextBox();
            this.btnJobTitle2 = new Button();
            this.label9 = new Label();
            this.txtJobTitle2 = new TextBox();
            this.txtPositionNo2 = new TextBox();
            this.label6 = new Label();
            this.label7 = new Label();
            this.txtPositionStartDate2 = new DateTimePicker();
            this.isDoublePosition = new CheckBox();
            this.txtPositionEndDate1 = new DateTimePicker();
            this.label3 = new Label();
            this.txtPositionLevel1 = new ComboBox();
            this.label2 = new Label();
            this.btnJobTitle = new Button();
            this.txtJobTitle1 = new TextBox();
            this.label35 = new Label();
            this.txtPositionStartDate1 = new DateTimePicker();
            this.label45 = new Label();
            this.txtPositionNo1 = new TextBox();
            this.label25 = new Label();
            this.txtPostionRemark1 = new TextBox();
            this.label24 = new Label();
            this.lbTitle = new Label();
            this.groupBox1.SuspendLayout();
            this.groupBox2.SuspendLayout();
            this.panel1.SuspendLayout();
            base.SuspendLayout();
            this.txtPosition1.BackColor = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPosition1.DropDownStyle = ComboBoxStyle.DropDownList;
            this.txtPosition1.FlatStyle = FlatStyle.Flat;
            this.txtPosition1.FormattingEnabled = true;
            this.txtPosition1.ItemHeight = 12;
            this.txtPosition1.Location = new Point(0x49, 0x1f);
            this.txtPosition1.Name = "txtPosition1";
            this.txtPosition1.Size = new Size(0x88, 20);
            this.txtPosition1.TabIndex = 0x31;
            this.txtPosition1.SelectedIndexChanged += new EventHandler(this.txtPosition1_SelectedIndexChanged);
            this.label37.AutoSize = true;
            this.label37.Location = new Point(15, 0x22);
            this.label37.Name = "label37";
            this.label37.Size = new Size(0x35, 12);
            this.label37.TabIndex = 0x30;
            this.label37.Text = "岗位类别";
            this.btnCancel.BackColor = Color.White;
            this.btnCancel.FlatStyle = FlatStyle.Popup;
            this.btnCancel.Location = new Point(0x1e2, 0x180);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new Size(0x4b, 0x17);
            this.btnCancel.TabIndex = 0x34;
            this.btnCancel.Text = "关闭";
            this.btnCancel.UseVisualStyleBackColor = false;
            this.btnCancel.Click += new EventHandler(this.btnCancel_Click);
            this.btnSave.BackColor = Color.White;
            this.btnSave.FlatStyle = FlatStyle.Popup;
            this.btnSave.Location = new Point(0xd9, 0x180);
            this.btnSave.Name = "btnSave";
            this.btnSave.Size = new Size(0x4b, 0x17);
            this.btnSave.TabIndex = 0x33;
            this.btnSave.Text = "保存";
            this.btnSave.UseVisualStyleBackColor = false;
            this.btnSave.Click += new EventHandler(this.btnSave_Click);
            this.groupBox1.Controls.Add(this.txtSex);
            this.groupBox1.Controls.Add(this.label1);
            this.groupBox1.Controls.Add(this.txtUserName);
            this.groupBox1.Controls.Add(this.label8);
            this.groupBox1.ForeColor = SystemColors.WindowText;
            this.groupBox1.Location = new Point(12, 0x34);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new Size(760, 0x33);
            this.groupBox1.TabIndex = 50;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "基本信息";
            this.txtSex.BackColor = Color.WhiteSmoke;
            this.txtSex.BorderStyle = BorderStyle.FixedSingle;
            this.txtSex.Enabled = false;
            this.txtSex.ForeColor = SystemColors.ControlDarkDark;
            this.txtSex.Location = new Point(0x153, 0x11);
            this.txtSex.Name = "txtSex";
            this.txtSex.ReadOnly = true;
            this.txtSex.Size = new Size(0x87, 0x15);
            this.txtSex.TabIndex = 13;
            this.label1.AutoSize = true;
            this.label1.Location = new Point(0x130, 0x15);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0x1d, 12);
            this.label1.TabIndex = 12;
            this.label1.Text = "性别";
            this.txtUserName.BackColor = Color.WhiteSmoke;
            this.txtUserName.BorderStyle = BorderStyle.FixedSingle;
            this.txtUserName.Enabled = false;
            this.txtUserName.ForeColor = SystemColors.ControlDarkDark;
            this.txtUserName.Location = new Point(0x4a, 0x11);
            this.txtUserName.Name = "txtUserName";
            this.txtUserName.ReadOnly = true;
            this.txtUserName.Size = new Size(0x87, 0x15);
            this.txtUserName.TabIndex = 11;
            this.label8.AutoSize = true;
            this.label8.Location = new Point(0x27, 0x15);
            this.label8.Name = "label8";
            this.label8.Size = new Size(0x1d, 12);
            this.label8.TabIndex = 10;
            this.label8.Text = "姓名";
            this.groupBox2.Controls.Add(this.panel1);
            this.groupBox2.Controls.Add(this.isDoublePosition);
            this.groupBox2.Controls.Add(this.txtPositionEndDate1);
            this.groupBox2.Controls.Add(this.label3);
            this.groupBox2.Controls.Add(this.txtPositionLevel1);
            this.groupBox2.Controls.Add(this.label2);
            this.groupBox2.Controls.Add(this.btnJobTitle);
            this.groupBox2.Controls.Add(this.txtJobTitle1);
            this.groupBox2.Controls.Add(this.label35);
            this.groupBox2.Controls.Add(this.txtPositionStartDate1);
            this.groupBox2.Controls.Add(this.label45);
            this.groupBox2.Controls.Add(this.txtPositionNo1);
            this.groupBox2.Controls.Add(this.label25);
            this.groupBox2.Controls.Add(this.txtPostionRemark1);
            this.groupBox2.Controls.Add(this.label24);
            this.groupBox2.Controls.Add(this.txtPosition1);
            this.groupBox2.Controls.Add(this.label37);
            this.groupBox2.ForeColor = SystemColors.WindowText;
            this.groupBox2.Location = new Point(12, 0x79);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new Size(760, 0xf6);
            this.groupBox2.TabIndex = 0x35;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "岗位信息";
            this.panel1.Controls.Add(this.txtPositionEndDate2);
            this.panel1.Controls.Add(this.txtPosition2);
            this.panel1.Controls.Add(this.label4);
            this.panel1.Controls.Add(this.label11);
            this.panel1.Controls.Add(this.txtPositionLevel2);
            this.panel1.Controls.Add(this.label10);
            this.panel1.Controls.Add(this.label5);
            this.panel1.Controls.Add(this.txtPostionRemark2);
            this.panel1.Controls.Add(this.btnJobTitle2);
            this.panel1.Controls.Add(this.label9);
            this.panel1.Controls.Add(this.txtJobTitle2);
            this.panel1.Controls.Add(this.txtPositionNo2);
            this.panel1.Controls.Add(this.label6);
            this.panel1.Controls.Add(this.label7);
            this.panel1.Controls.Add(this.txtPositionStartDate2);
            this.panel1.Location = new Point(3, 0x8e);
            this.panel1.Name = "panel1";
            this.panel1.Size = new Size(0x2cb, 0x5c);
            this.panel1.TabIndex = 0x68;
            this.txtPositionEndDate2.CalendarMonthBackground = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPositionEndDate2.Location = new Point(0x14f, 0x24);
            this.txtPositionEndDate2.Name = "txtPositionEndDate2";
            this.txtPositionEndDate2.Size = new Size(0x87, 0x15);
            this.txtPositionEndDate2.TabIndex = 0x67;
            this.txtPosition2.BackColor = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPosition2.DropDownStyle = ComboBoxStyle.DropDownList;
            this.txtPosition2.FlatStyle = FlatStyle.Flat;
            this.txtPosition2.FormattingEnabled = true;
            this.txtPosition2.ItemHeight = 12;
            this.txtPosition2.Location = new Point(0x45, 8);
            this.txtPosition2.Name = "txtPosition2";
            this.txtPosition2.Size = new Size(0x88, 20);
            this.txtPosition2.TabIndex = 90;
            this.txtPosition2.SelectedIndexChanged += new EventHandler(this.txtPosition2_SelectedIndexChanged);
            this.label4.AutoSize = true;
            this.label4.Location = new Point(0x114, 40);
            this.label4.Name = "label4";
            this.label4.Size = new Size(0x35, 12);
            this.label4.TabIndex = 0x66;
            this.label4.Text = "止骋时间";
            this.label11.AutoSize = true;
            this.label11.Location = new Point(11, 11);
            this.label11.Name = "label11";
            this.label11.Size = new Size(0x35, 12);
            this.label11.TabIndex = 0x59;
            this.label11.Text = "岗位类别";
            this.txtPositionLevel2.BackColor = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPositionLevel2.DropDownStyle = ComboBoxStyle.DropDownList;
            this.txtPositionLevel2.FlatStyle = FlatStyle.Flat;
            this.txtPositionLevel2.FormattingEnabled = true;
            this.txtPositionLevel2.ItemHeight = 12;
            this.txtPositionLevel2.Location = new Point(0x14e, 8);
            this.txtPositionLevel2.Name = "txtPositionLevel2";
            this.txtPositionLevel2.Size = new Size(0x88, 20);
            this.txtPositionLevel2.TabIndex = 0x65;
            this.label10.AutoSize = true;
            this.label10.Location = new Point(0x23, 0x41);
            this.label10.Name = "label10";
            this.label10.Size = new Size(0x1d, 12);
            this.label10.TabIndex = 0x5b;
            this.label10.Text = "文号";
            this.label5.AutoSize = true;
            this.label5.Location = new Point(0x114, 11);
            this.label5.Name = "label5";
            this.label5.Size = new Size(0x35, 12);
            this.label5.TabIndex = 100;
            this.label5.Text = "岗位等级";
            this.txtPostionRemark2.BackColor = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPostionRemark2.BorderStyle = BorderStyle.FixedSingle;
            this.txtPostionRemark2.Location = new Point(0x14e, 0x40);
            this.txtPostionRemark2.Name = "txtPostionRemark2";
            this.txtPostionRemark2.Size = new Size(0x178, 0x15);
            this.txtPostionRemark2.TabIndex = 0x5c;
            this.btnJobTitle2.BackColor = Color.Gainsboro;
            this.btnJobTitle2.FlatAppearance.BorderColor = Color.DimGray;
            this.btnJobTitle2.FlatStyle = FlatStyle.Flat;
            this.btnJobTitle2.Location = new Point(0x2b0, 9);
            this.btnJobTitle2.Name = "btnJobTitle2";
            this.btnJobTitle2.Size = new Size(0x15, 0x15);
            this.btnJobTitle2.TabIndex = 0x63;
            this.btnJobTitle2.Text = "…";
            this.btnJobTitle2.UseVisualStyleBackColor = false;
            this.btnJobTitle2.Click += new EventHandler(this.btnJobTitle2_Click);
            this.label9.AutoSize = true;
            this.label9.Location = new Point(0x114, 0x44);
            this.label9.Name = "label9";
            this.label9.Size = new Size(0x35, 12);
            this.label9.TabIndex = 0x5d;
            this.label9.Text = "文件摘要";
            this.txtJobTitle2.BackColor = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtJobTitle2.BorderStyle = BorderStyle.FixedSingle;
            this.txtJobTitle2.Location = new Point(0x23e, 9);
            this.txtJobTitle2.Name = "txtJobTitle2";
            this.txtJobTitle2.Size = new Size(0x87, 0x15);
            this.txtJobTitle2.TabIndex = 0x62;
            this.txtPositionNo2.BackColor = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPositionNo2.BorderStyle = BorderStyle.FixedSingle;
            this.txtPositionNo2.Location = new Point(0x45, 0x3f);
            this.txtPositionNo2.Name = "txtPositionNo2";
            this.txtPositionNo2.Size = new Size(0x87, 0x15);
            this.txtPositionNo2.TabIndex = 0x5e;
            this.label6.AutoSize = true;
            this.label6.Location = new Point(0x203, 11);
            this.label6.Name = "label6";
            this.label6.Size = new Size(0x35, 12);
            this.label6.TabIndex = 0x61;
            this.label6.Text = "岗位名称";
            this.label7.AutoSize = true;
            this.label7.Location = new Point(10, 0x26);
            this.label7.Name = "label7";
            this.label7.Size = new Size(0x35, 12);
            this.label7.TabIndex = 0x5f;
            this.label7.Text = "起骋时间";
            this.txtPositionStartDate2.CalendarMonthBackground = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPositionStartDate2.Location = new Point(0x45, 0x22);
            this.txtPositionStartDate2.Name = "txtPositionStartDate2";
            this.txtPositionStartDate2.Size = new Size(0x87, 0x15);
            this.txtPositionStartDate2.TabIndex = 0x60;
            this.isDoublePosition.AutoSize = true;
            this.isDoublePosition.Location = new Point(0x48, 120);
            this.isDoublePosition.Name = "isDoublePosition";
            this.isDoublePosition.Size = new Size(0x54, 0x10);
            this.isDoublePosition.TabIndex = 0x58;
            this.isDoublePosition.Text = "是否双肩挑";
            this.isDoublePosition.UseVisualStyleBackColor = true;
            this.isDoublePosition.CheckedChanged += new EventHandler(this.isTwoPosition_CheckedChanged);
            this.txtPositionEndDate1.CalendarMonthBackground = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPositionEndDate1.Location = new Point(0x153, 0x3b);
            this.txtPositionEndDate1.Name = "txtPositionEndDate1";
            this.txtPositionEndDate1.Size = new Size(0x87, 0x15);
            this.txtPositionEndDate1.TabIndex = 0x57;
            this.label3.AutoSize = true;
            this.label3.Location = new Point(280, 0x3f);
            this.label3.Name = "label3";
            this.label3.Size = new Size(0x35, 12);
            this.label3.TabIndex = 0x56;
            this.label3.Text = "止骋时间";
            this.txtPositionLevel1.BackColor = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPositionLevel1.DropDownStyle = ComboBoxStyle.DropDownList;
            this.txtPositionLevel1.FlatStyle = FlatStyle.Flat;
            this.txtPositionLevel1.FormattingEnabled = true;
            this.txtPositionLevel1.ItemHeight = 12;
            this.txtPositionLevel1.Location = new Point(0x152, 0x1f);
            this.txtPositionLevel1.Name = "txtPositionLevel1";
            this.txtPositionLevel1.Size = new Size(0x88, 20);
            this.txtPositionLevel1.TabIndex = 0x55;
            this.label2.AutoSize = true;
            this.label2.Location = new Point(280, 0x22);
            this.label2.Name = "label2";
            this.label2.Size = new Size(0x35, 12);
            this.label2.TabIndex = 0x54;
            this.label2.Text = "岗位等级";
            this.btnJobTitle.BackColor = Color.Gainsboro;
            this.btnJobTitle.FlatAppearance.BorderColor = Color.DimGray;
            this.btnJobTitle.FlatStyle = FlatStyle.Flat;
            this.btnJobTitle.Location = new Point(0x2b4, 0x20);
            this.btnJobTitle.Name = "btnJobTitle";
            this.btnJobTitle.Size = new Size(0x15, 0x15);
            this.btnJobTitle.TabIndex = 0x53;
            this.btnJobTitle.Text = "…";
            this.btnJobTitle.UseVisualStyleBackColor = false;
            this.btnJobTitle.Click += new EventHandler(this.btnJobTitle_Click);
            this.txtJobTitle1.BackColor = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtJobTitle1.BorderStyle = BorderStyle.FixedSingle;
            this.txtJobTitle1.Location = new Point(0x242, 0x20);
            this.txtJobTitle1.Name = "txtJobTitle1";
            this.txtJobTitle1.Size = new Size(0x87, 0x15);
            this.txtJobTitle1.TabIndex = 0x52;
            this.label35.AutoSize = true;
            this.label35.Location = new Point(0x207, 0x22);
            this.label35.Name = "label35";
            this.label35.Size = new Size(0x35, 12);
            this.label35.TabIndex = 0x51;
            this.label35.Text = "岗位名称";
            this.txtPositionStartDate1.CalendarMonthBackground = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPositionStartDate1.Location = new Point(0x49, 0x39);
            this.txtPositionStartDate1.Name = "txtPositionStartDate1";
            this.txtPositionStartDate1.Size = new Size(0x87, 0x15);
            this.txtPositionStartDate1.TabIndex = 80;
            this.label45.AutoSize = true;
            this.label45.Location = new Point(14, 0x3d);
            this.label45.Name = "label45";
            this.label45.Size = new Size(0x35, 12);
            this.label45.TabIndex = 0x4f;
            this.label45.Text = "起骋时间";
            this.txtPositionNo1.BackColor = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPositionNo1.BorderStyle = BorderStyle.FixedSingle;
            this.txtPositionNo1.Location = new Point(0x49, 0x56);
            this.txtPositionNo1.Name = "txtPositionNo1";
            this.txtPositionNo1.Size = new Size(0x87, 0x15);
            this.txtPositionNo1.TabIndex = 60;
            this.label25.AutoSize = true;
            this.label25.Location = new Point(280, 0x5b);
            this.label25.Name = "label25";
            this.label25.Size = new Size(0x35, 12);
            this.label25.TabIndex = 0x3b;
            this.label25.Text = "文件摘要";
            this.txtPostionRemark1.BackColor = Color.FromArgb(0xd9, 0xea, 0xf7);
            this.txtPostionRemark1.BorderStyle = BorderStyle.FixedSingle;
            this.txtPostionRemark1.Location = new Point(0x152, 0x57);
            this.txtPostionRemark1.Name = "txtPostionRemark1";
            this.txtPostionRemark1.Size = new Size(0x177, 0x15);
            this.txtPostionRemark1.TabIndex = 0x3a;
            this.label24.AutoSize = true;
            this.label24.Location = new Point(0x27, 0x58);
            this.label24.Name = "label24";
            this.label24.Size = new Size(0x1d, 12);
            this.label24.TabIndex = 0x39;
            this.label24.Text = "文号";
            this.lbTitle.BackColor = Color.Gold;
            this.lbTitle.Dock = DockStyle.Top;
            this.lbTitle.Font = new Font("宋体", 14.25f, FontStyle.Bold, GraphicsUnit.Point, 0x86);
            this.lbTitle.ForeColor = Color.Black;
            this.lbTitle.Location = new Point(0, 0);
            this.lbTitle.Name = "lbTitle";
            this.lbTitle.Size = new Size(0x310, 0x1f);
            this.lbTitle.TabIndex = 0x36;
            this.lbTitle.Text = "人员定岗";
            this.lbTitle.TextAlign = ContentAlignment.MiddleCenter;
            base.AutoScaleDimensions = new SizeF(6f, 12f);
            base.AutoScaleMode = AutoScaleMode.Font;
            this.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            base.ClientSize = new Size(0x310, 430);
            base.Controls.Add(this.lbTitle);
            base.Controls.Add(this.groupBox2);
            base.Controls.Add(this.btnCancel);
            base.Controls.Add(this.btnSave);
            base.Controls.Add(this.groupBox1);
            base.FormBorderStyle = FormBorderStyle.FixedSingle;
            base.Icon = (Icon) manager.GetObject("$this.Icon");
            base.MaximizeBox = false;
            base.MinimizeBox = false;
            base.Name = "FrmPositionLevelUpdate";
            base.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "人员定岗";
            base.Load += new EventHandler(this.FrmUpdatePositionLevel_Load);
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.groupBox2.ResumeLayout(false);
            this.groupBox2.PerformLayout();
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            base.ResumeLayout(false);
        }

        private void isTwoPosition_CheckedChanged(object sender, EventArgs e)
        {
            this.panel1.Enabled = this.isDoublePosition.Checked;
        }

        private void txtPosition1_SelectedIndexChanged(object sender, EventArgs e)
        {
            List<UserPositionLevel> list = this.LevelList.FindAll(f => f.PositionID == int.Parse(this.txtPosition1.SelectedValue.ToString()));
            UserPositionLevel item = new UserPositionLevel {
                LevelID = 0,
                PositionID = 0,
                LevelValue = "请选择"
            };
            list.Insert(0, item);
            this.txtPositionLevel1.DataSource = list;
        }

        private void txtPosition2_SelectedIndexChanged(object sender, EventArgs e)
        {
            List<UserPositionLevel> list = this.LevelList.FindAll(f => f.PositionID == int.Parse(this.txtPosition2.SelectedValue.ToString()));
            UserPositionLevel item = new UserPositionLevel {
                LevelID = 0,
                PositionID = 0,
                LevelValue = "请选择"
            };
            list.Insert(0, item);
            this.txtPositionLevel2.DataSource = list;
        }
    }
}

